#include "../../Server.hpp"
#include "../Http.hpp"
int main()
{
    Socket client;
    client.CreateClient(8080,"127.0.0.1");
    std::string req = "PUT /1234.txt HTTP/1.1\r\nConnection: keep-alive\r\n";
    std::string body;
    Util::ReadFile("./hello.txt",&body);  
    req += "Content-Length: " + std::to_string(body.size()) + "\r\n\r\n";  
    //我们这里只发送一次，然后看看服务器那边是否有相同的文件生成
    assert(client.Send(req.c_str(),req.size()) != -1);    
    assert(client.Send(body.c_str(),body.size()) != -1);    
    char buffer[1024] = {0};
    assert(client.Recv(buffer,1023) != -1);
    DBG_LOG("%s",buffer);
    client.Close();
    return 0;
}